home *** CD-ROM | disk | FTP | other *** search
- VERSION 2.00
- Begin Form Form1
- BorderStyle = 1 'Fixed Single
- Caption = "VB Example 23"
- ClientHeight = 3930
- ClientLeft = 2295
- ClientTop = 1455
- ClientWidth = 5115
- Height = 4335
- Left = 2235
- LinkTopic = "Form1"
- ScaleHeight = 3930
- ScaleWidth = 5115
- Top = 1110
- Width = 5235
- Begin TextBox FileProgressWindow
- BackColor = &H00C0C0C0&
- BorderStyle = 0 'None
- Enabled = 0 'False
- Height = 375
- Left = 120
- TabIndex = 2
- Text = "Invisible FileProgressWindow"
- Top = 2520
- Width = 615
- End
- Begin TextBox JobProgressWindow
- BackColor = &H00C0C0C0&
- BorderStyle = 0 'None
- Enabled = 0 'False
- Height = 375
- Left = 240
- TabIndex = 3
- Text = "Invisible JobProgressWindow"
- Top = 3120
- Width = 735
- End
- Begin SSPanel Panel3D2
- BackColor = &H00C0C0C0&
- Caption = "Panel3D2"
- FloodType = 1 'Left To Right
- Font3D = 0 'None
- Height = 375
- Left = 2400
- TabIndex = 14
- Top = 3120
- Width = 2535
- End
- Begin SSPanel Panel3D1
- BackColor = &H00C0C0C0&
- Caption = "Panel3D1"
- FloodType = 1 'Left To Right
- Font3D = 0 'None
- Height = 375
- Left = 2400
- TabIndex = 13
- Top = 2520
- Width = 2535
- End
- Begin TextBox InputFiles
- Height = 375
- Left = 2280
- TabIndex = 12
- Text = "Input Files"
- Top = 720
- Width = 2415
- End
- Begin TextBox ArchiveName
- Height = 375
- Left = 2280
- TabIndex = 11
- Text = "Archive Name"
- Top = 240
- Width = 2415
- End
- Begin CommandButton About
- Caption = "About"
- Height = 375
- Left = 3240
- TabIndex = 10
- Top = 1320
- Width = 1335
- End
- Begin CommandButton ExitButton
- Caption = "Exit"
- Height = 375
- Left = 1680
- TabIndex = 9
- Top = 1320
- Width = 1335
- End
- Begin TextBox TextWindow
- BackColor = &H00C0C0C0&
- BorderStyle = 0 'None
- Height = 495
- Left = 2640
- TabIndex = 1
- Text = "Text1"
- Top = 1920
- Width = 1935
- End
- Begin CommandButton Compress
- Caption = "Compress"
- Height = 375
- Left = 120
- TabIndex = 0
- Top = 1320
- Width = 1335
- End
- Begin SSPanel Panel3D3
- BackColor = &H00C0C0C0&
- Font3D = 0 'None
- Height = 4815
- Left = 0
- TabIndex = 15
- Top = 0
- Width = 5175
- Begin Label Label5
- Alignment = 1 'Right Justify
- BackStyle = 0 'Transparent
- Caption = "Input Files:"
- Height = 375
- Left = 840
- TabIndex = 4
- Top = 720
- Width = 1215
- End
- Begin Label Label4
- Alignment = 1 'Right Justify
- BackStyle = 0 'Transparent
- Caption = "Archive Name:"
- Height = 375
- Left = 600
- TabIndex = 5
- Top = 240
- Width = 1335
- End
- Begin Label Label3
- Alignment = 1 'Right Justify
- BackStyle = 0 'Transparent
- Caption = "Job Percent Complete:"
- Height = 495
- Left = 480
- TabIndex = 8
- Top = 3120
- Width = 1815
- End
- Begin Label Label2
- Alignment = 1 'Right Justify
- BackStyle = 0 'Transparent
- Caption = "File Percent Complete:"
- Height = 375
- Left = 480
- TabIndex = 7
- Top = 2520
- Width = 1815
- End
- Begin Label Label1
- Alignment = 1 'Right Justify
- BackStyle = 0 'Transparent
- Caption = "File Being Compressed:"
- Height = 375
- Left = 480
- TabIndex = 6
- Top = 1920
- Width = 1815
- End
- End
- Dim LibraryHandle As Long
- Sub About_Click ()
- frmAbout.Text1 = "EX23VB demonstrates the simplified interface. Compress will add *.FRM"
- frmAbout.Text1 = frmAbout.Text1 + " files to VB00.ZIP."
- frmAbout.Show 1
- End Sub
- Sub Compress_Click ()
- Dim i As Integer
- About.SetFocus
- Compress.Enabled = 0
- ExitButton.Enabled = 0
- i = ALCreate(ArchiveName.Text, InputFiles.Text, 0, TextWindow.hWnd, FileProgressWindow.hWnd, JobProgressWindow.hWnd)
- ExitButton.Enabled = 1
- Compress.Enabled = 1
- Compress.SetFocus
- End Sub
- Sub ExitButton_Click ()
- FreeLibrary (LibraryHandle)
- End
- End Sub
- Sub FileProgressWindow_Change ()
- Panel3D1.FloodPercent = Val(FileProgressWindow.Text)
- End Sub
- Sub Form_Load ()
- ChDrive App.Path
- ChDir App.Path
- LibraryHandle = LoadLibrary(DLLName())
- If LibraryHandle < 32 Then
- InputFiles.Text = "Can't Find DLL!"
- Else
- InputFiles.Text = "*.frm"
- End If
- ArchiveName.Text = "vb00.zip"
- End Sub
- Sub Form_Unload (Cancel As Integer)
- FreeLibrary (LibraryHandle)
- End Sub
- Sub JobProgressWindow_Change ()
- Panel3D2.FloodPercent = Val(JobProgressWindow.Text)
- End Sub
- Sub TextWindow_GotFocus ()
- ExitButton.SetFocus
- End Sub
-